<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
include  'admin/Util.php';
include  'slider/SliderGallery.php';
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
    <head>
        <?php
        include  'meta.php';
        ?>
        <title><?php echo Constants::$mainHeader ?></title>
        <?php
        include  'headIcon.php';
        include  'headJSCSS.php';

        $contents = file_get_contents('slider/sliderCSS.php');
        $getID = '1';
        echo  str_replace('$getID', $getID, $contents);
        ?>
    </head>
    <body>
        <?php
        $contents = file_get_contents('slider/sliderScript.php');
        $getID = '1';
        echo  str_replace('$getID', $getID, $contents);
        ?>

        <h1><?php echo Constants::$mainHeader ?></h1>

        <?php
        include  'menu.php';
        ?>

        <!-- CONTENTS START -->

        <div id="contents">
            <div class="boxtop"></div>


            <?php
            $link = Util::getLink();

            if ($_GET["id"] == null) {
                die('Not enough parameters.');
            }

            $query = sprintf(Util::$select_jornakText,
                mysql_real_escape_string($_GET["id"])
            );

            $result = mysql_query($query);

            if (!$result) {
                die('Could not query:' . mysql_error());
            }

            while ($row = mysql_fetch_assoc($result)) {?>
            <div class="boxhdr"><h2><?php echo stripslashes($row['header']) ?></h2></div> <!-- PAGE NAME = PROJECT NAME -->
            <div class="boxtxt">
                    <?php
                    $flashContents = file_get_contents('flash.php');
                    $getFlashPath = Constants::$uploads_dir_fromWeb.$row['video'];
                    echo  str_replace('$getFlashPath', $getFlashPath, $flashContents);
                    ?>
					<br>
                    <?php
                    $myArray = explode(';',$row['imgs']);
                    if ($myArray[0] != null) {
                        SliderGallery::getSliderEven($myArray, '1');
                    }
                    echo '<hr />';

                    echo '<h3>'.stripslashes($row['header'])."</h3>";
                    echo '<p>'.stripslashes($row['text'])."</p>";
                    $preparePresent = explode(';',$row['present']);
                    echo '<ul><li><a href="'.Constants::$uploads_dir_fromWeb.$preparePresent[0].'"> DOWNLOAD '.$preparePresent[1]." PROJECT HERE</a></li></ul>";

                }

                Util::closeLink($link);

                ?>

                <div id="cleaner"></div>
            </div>
            <div class="boxbtm"></div>
        </div>

        <!-- CONTENTS END -->

        <?php
        include  'footer.php';
        ?>

    </body>
    <?php include 'googleAnalyt.php';?>
</html>